Optimal. Leaf size=51 \[ -\frac {(a+b) \cos (c+d x)}{d}+\frac {(a+2 b) \cos ^3(c+d x)}{3 d}-\frac {b \cos ^5(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3092, 380}
\begin {gather*} \frac {(a+2 b) \cos ^3(c+d x)}{3 d}-\frac {(a+b) \cos (c+d x)}{d}-\frac {b \cos ^5(c+d x)}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 380
Rule 3092
Rubi steps
\begin {align*} \int \sin ^3(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx &=-\frac {\text {Subst}\left (\int \left (1-x^2\right ) \left (a+b-b x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \left (a \left (1+\frac {b}{a}\right )-(a+2 b) x^2+b x^4\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {(a+b) \cos (c+d x)}{d}+\frac {(a+2 b) \cos ^3(c+d x)}{3 d}-\frac {b \cos ^5(c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 77, normalized size = 1.51 \begin {gather*} -\frac {3 a \cos (c+d x)}{4 d}-\frac {5 b \cos (c+d x)}{8 d}+\frac {a \cos (3 (c+d x))}{12 d}+\frac {5 b \cos (3 (c+d x))}{48 d}-\frac {b \cos (5 (c+d x))}{80 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 54, normalized size = 1.06
method | result | size |
derivativedivides | \(\frac {-\frac {b \left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )}{5}-\frac {a \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}}{d}\) | \(54\) |
default | \(\frac {-\frac {b \left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )}{5}-\frac {a \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}}{d}\) | \(54\) |
risch | \(-\frac {3 \cos \left (d x +c \right ) a}{4 d}-\frac {5 b \cos \left (d x +c \right )}{8 d}-\frac {b \cos \left (5 d x +5 c \right )}{80 d}+\frac {a \cos \left (3 d x +3 c \right )}{12 d}+\frac {5 \cos \left (3 d x +3 c \right ) b}{48 d}\) | \(71\) |
norman | \(\frac {-\frac {20 a +16 b}{15 d}-\frac {4 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 \left (14 a +16 b \right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {\left (20 a +16 b \right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(93\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 43, normalized size = 0.84 \begin {gather*} -\frac {3 \, b \cos \left (d x + c\right )^{5} - 5 \, {\left (a + 2 \, b\right )} \cos \left (d x + c\right )^{3} + 15 \, {\left (a + b\right )} \cos \left (d x + c\right )}{15 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 43, normalized size = 0.84 \begin {gather*} -\frac {3 \, b \cos \left (d x + c\right )^{5} - 5 \, {\left (a + 2 \, b\right )} \cos \left (d x + c\right )^{3} + 15 \, {\left (a + b\right )} \cos \left (d x + c\right )}{15 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 107 vs.
\(2 (44) = 88\).
time = 0.26, size = 107, normalized size = 2.10 \begin {gather*} \begin {cases} - \frac {a \sin ^{2}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{d} - \frac {2 a \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac {b \sin ^{4}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{d} - \frac {4 b \sin ^{2}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac {8 b \cos ^{5}{\left (c + d x \right )}}{15 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin ^{2}{\left (c \right )}\right ) \sin ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 67, normalized size = 1.31 \begin {gather*} -\frac {b \cos \left (d x + c\right )^{5}}{5 \, d} + \frac {a \cos \left (d x + c\right )^{3}}{3 \, d} + \frac {2 \, b \cos \left (d x + c\right )^{3}}{3 \, d} - \frac {a \cos \left (d x + c\right )}{d} - \frac {b \cos \left (d x + c\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 13.37, size = 44, normalized size = 0.86 \begin {gather*} -\frac {\frac {b\,{\cos \left (c+d\,x\right )}^5}{5}+\left (-\frac {a}{3}-\frac {2\,b}{3}\right )\,{\cos \left (c+d\,x\right )}^3+\left (a+b\right )\,\cos \left (c+d\,x\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________